﻿using System;
using System.Numerics;

class Program
{
    static void Main()
    {
        int result = 0;
        Console.Write("N = ");
        int n = int.Parse(Console.ReadLine());
        BigInteger f = 1;
        do
        {
            f *= n;
            n--;
        }
        while (n > 0);
        for (int i = 1; f % 5 == 0; i++)
        {
            f = f / 5;
            result++;
        }
        Console.Write("Trailing Zeros: ");
        Console.WriteLine(result);
        //It's not working for N = 50 000!!
    }
}